feat(discovery): ignore-dirs + recursive projects discovery#140
Merged
feat(discovery): ignore-dirs + recursive projects discovery#140
Conversation
Agents: - scanner.getAllFiles skips IGNORE_DIRS (node_modules, .git, .github, .github-private, .claude, dist, build, .next, coverage, .turbo, .cache) so pointing a discovery dir at a repo with deps no longer picks up ghost agents shipped by packages or checked into build output. Projects: - discoverProjects now takes a single root or an array; walks recursively (max depth 5); skips the same ignore set (plus the implicit .git match); stops descending once a .git dir is found (each repo is a discovery boundary). - `agentage projects discover` with no path now reads getProjectsDirs(config) instead of defaulting to cwd — so `projects.default` + `projects.additional` drives the walk. Unblocks: pointing at /home/user/projects finds nested repos like agentage/cli and agentage/web without adding each one manually.
Contributor
|
🎉 PR Validation ✅ PASSED Commit: Checks:
Ready to merge! ✨ 🔗 View workflow run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two follow-ups to the config-defaults work (PRs #135, #138):
Agents (scanner):
src/discovery/scanner.ts— addedIGNORE_DIRSset (node_modules,.git,.github,.github-private,.claude,dist,build,.next,coverage,.turbo,.cache) and skip them ingetAllFiles. Pointing a discovery dir at a repo with dependencies no longer picks up ghost agents shipped inside packages or checked into build output.Projects (discovery):
src/projects/projects.ts—discoverProjectsnow acceptsstring | string[], walks recursively (depth cap 5), stops descending once it finds a.gitdir (repo boundary), and skips the same ignore set. Old one-level behavior is gone.src/commands/projects.ts—agentage projects discoverwith no path now readsgetProjectsDirs(loadConfig())instead of defaulting to cwd. Single-root setups inprojects.defaultdrive the walk.Unblocks: pointing
projects.defaultat~/projectsfinds nested repos likeagentage/cli,agentage/web,agentsautomatically.Test plan
npm run verify— 512 tests pass (5 new: scanner IGNORE_DIRS, projects recursive walk, projects ignore set, array-of-roots dedupe, repo-boundary stop; 2 existing projects cmd tests updated for new signature).agentage projects discover(no args) on the dev machine — confirm it walksprojects.defaultand finds repos without cwd-dependent behaviour.agentage status --set-default /home/vreshch/projects/agents/pluginsthenagentage agents --refresh— confirm no ghost agents fromnode_modules.